package com.lill.org.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lill.common.component.util.IdUtil;
import com.lill.org.dao.IPersonDao;
import com.lill.org.model.PersonModel;
import com.lill.org.service.IPersonService;

/**
 * 人员管理Service实现类
 *
 * @author lill
 * @date 2019-04-25 20:45:24
 */
@Service("orgPersonService")
public class PersonServiceImpl implements IPersonService {
    @Autowired
    private IPersonDao orgPersonDao;

    public PersonModel queryObject(String id) {
        return orgPersonDao.queryObject(id);
    }

    public List<PersonModel> queryList(Map<String, Object> map) {
        return orgPersonDao.queryList(map);
    }

    public int queryTotal(Map<String, Object> map) {
        return orgPersonDao.queryTotal(map);
    }

    public int save(PersonModel person) {
        person.setId(IdUtil.createIdbyUUID());
        return orgPersonDao.save(person);
    }

    public int update(PersonModel person) {
        return orgPersonDao.update(person);
    }

    public int delete(String id) {
        return orgPersonDao.delete(id);
    }

    public int deleteBatch(String[] ids) {
        return orgPersonDao.deleteBatch(ids);
    }
    
	public int deleteLogicByMap(Map<String, Object> map) {
		return orgPersonDao.deleteLogicByMap(map);
	}
}
